<#assign module="marketing"/>

<@override name="header">
</@override>
<@override name="body">

<div class="row">
	<div class="col-xs-10">
	  	<div class="btn-group">
		  <a class="btn btn-default" href="${ctx}/weixinmanager/list">客户经理</a>
		  <a class="btn btn-default active" href="${ctx}/weixinmanager/agreement">合作协议</a>
		  <a class="btn btn-default" href="${ctx}/weixinmanager/tixian">提现审核 <span class="label label-danger" id="wait_audit_label"></span></a>
		</div>
	</div>
</div>


<div class="row">
	<div class="col-xs-12">
		<form id="submit_form" action="${ctx}/weixinmanager/saveSetting" class="form-horizontal" role="form" method="post">
			<div class="form-group margin-top">
                <div class="col-sm-3">
                    <input id="submit_button" type="submit" class="btn btn-primary" value="保存设置">
                </div>
            </div>
			<div class="panel panel-default margin-top">
	            <div class="panel-heading">合作协议</div>
	            <div class="panel-body">
	                <div class="form-group">
	                    <label class="col-sm-1 control-label"></label>
	                    <div class="col-sm-10">
	                        <textarea rows="5" cols="60" id="agreement" name="agreement">${setting.agreement?if_exists}</textarea>
	                    </div>
	                </div>
	            </div>
	        </div>
	        <#if username?? && username=="admin">
		        <div class="panel panel-default margin-top">
		            <div class="panel-heading">消息模版</div>
		            <div class="panel-body">
		                <div class="form-group">
		                    <label class="col-sm-1 control-label">头部内容</label>
		                    <div class="col-sm-4">
		                        <input class="form-control" id="templateAuditFirst" name="templateAuditFirst" value="${setting.templateAuditFirst?if_exists}" type="text"/>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-sm-1 control-label">尾部内容</label>
		                    <div class="col-sm-4">
		                        <input class="form-control" id="templateAuditRemark" name="templateAuditRemark" value="${setting.templateAuditRemark?if_exists}" type="text"/>
		                    </div>
		                </div>
		            </div>
		        </div>
	        </#if>
        </form>
	</div>
</div>
</@override>
<@override name="footer">
<script src="${ctx}/assets/js/weixinmanager/managercommon.js"></script>
<script src="${ctx}/assets/kindeditor/kindeditor-all-min.js"></script>
<script src="${ctx}/assets/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
	   KindEditor.ready(function (K) {
            K.create('#agreement', {
                filterMode: false,
                uploadJson: '${ctx}/common/kindeditor/fileupload',
                allowUpload: true,
                fileManagerJson: '${ctx}/common/kindeditor/filemanager',
                allowFileManager: true,
                height: 500,
                width: '100%',
                resizeType: 0,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                    });
                },
                afterBlur: function () {
                    this.sync();
                }
            });
        });
	});
</script>
</@override>
<@extends name="../layout.ftl"/>